/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cn.com.jsepc.rep.process;

import cn.com.jsepc.rep.comm.ConstUtil;
import com.jarp.db.DAO;
import java.util.ArrayList;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.servlet.ServletException;

/**
 *
 * @author zhaoyuan
 */
public class DeletePointRep {
    
    public String DeletePointRep(String refid){
        String res="";
        String[] myrefid=refid.split(",");
        ArrayList<String> list=new ArrayList<String>();
        for(int i=0;i<myrefid.length;i++){
            String sql="delete from tb_point_rep where refid="+myrefid[i];
            list.add(sql);
        }
        DAO dao=new DAO();
        try {
            boolean b=dao.execCommand(ConstUtil.DBNAME, list);
            if(b==true){
                res="ok";
            }
        } catch (ServletException ex) {
            Logger.getLogger(DeletePointRep.class.getName()).log(Level.SEVERE, null, ex);
        }
        return res;
    }
    
}
